{%extends "admin/base.html"%}
{% load i18n %}

{%block content%}
<div class="wrap">
	<h2 class="title1">{% trans 'Tags' %}</h2>
	<div id="col-container">
		<div id="col-left">
			<form id="posts-filter" action="#" method="post">
				<div class="clear"></div>
				<table class="list" cellspacing="0">
					<thead>
						<tr>
							<th>{% trans 'Name' %}</th>
							<th class="num">{% trans 'Count' %}</th>
						</tr>
					</thead>
					<tfoot>
						<tr>
							<th>{% trans 'Name' %}</th>
							<th class="num">{% trans 'Count' %}</th>
						</tr>
					</tfoot>
					<tbody>
						{% if tags.object_list %}
						{% for tag in tags.object_list %}
						<tr>
							<td>
								<strong>
									<a title="{% trans 'Edit' %} &quot;{{tag.name}}&quot;">
										{{ tag.name }}</a>
								</strong>
							</td>
							<td class="num">{{ tag.get_article_count }}</td>
						</tr>
						{% endfor %}
						{% else %}
						<tr>
							<td colspan="4" align="center">{% trans "No tags" %}</td>
						</tr>
						{% endif %}
					</tbody>
				</table>
				<div class="tablenav">
                    {% if tags.has_previous %}
                    <a href="?page={{ tags.previous_page_number }}">previous</a>
                    {% endif %}
                    {% for page in tags_page_range %}
                        {% ifequal page tags.number %}
                        <span>{{ page }}</span>
                        {% else %}
                        <a href="?page={{ page }}">{{ page }}</a>
                        {% endifequal %}
                    {% endfor %}
                    {% if tags.has_next %}
                        <a href="?page={{ tags.next_page_number }}">next</a>
                    {% endif %}
				</div>
				<br class="clear">
			</form>
		</div>
	</div>
</div>
{%endblock%}